home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Toolkit / Songbird 0.1 / Songbird_0_1_0.exe / chrome / content / watch_folders.xul < prev   
Extensible Markup Language  |  2006-02-07  |  6KB  |  168 lines

  1. ∩╗┐<?xml version="1.0"?>
  2. <!--
  3. /*
  4. //
  5. // BEGIN SONGBIRD GPL
  6. // 
  7. // This file is part of the Songbird web player.
  8. //
  9. // Copyright┬⌐ 2006 Pioneers of the Inevitable LLC
  10. // http://songbirdnest.com
  11. // 
  12. // This file may be licensed under the terms of of the
  13. // GNU General Public License Version 2 (the ΓÇ£GPLΓÇ¥).
  14. // 
  15. // Software distributed under the License is distributed 
  16. // on an ΓÇ£AS ISΓÇ¥ basis, WITHOUT WARRANTY OF ANY KIND, either 
  17. // express or implied. See the GPL for the specific language 
  18. // governing rights and limitations.
  19. //
  20. // You should have received a copy of the GPL along with this 
  21. // program. If not, go to http://www.gnu.org/licenses/gpl.html
  22. // or write to the Free Software Foundation, Inc., 
  23. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  24. // 
  25. // END SONGBIRD GPL
  26. //
  27.  */
  28. -->
  29. <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
  30. <?xml-stylesheet href="chrome://rmp_demo/skin" type="text/css"?>
  31. <?xml-stylesheet href="chrome://rmp_demo/content/bindings/bindings.css" type="text/css"?>
  32. <!DOCTYPE window SYSTEM "chrome://rmp_demo/locale/rmp_demo.dtd" >
  33. <window
  34.  xmlns:html="http://www.w3.org/1999/xhtml"
  35.  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  36.  id="watchfolder"
  37.  title="&watchfolder.title;"
  38.  hidechrome="true"
  39.  onkeypress="if ( event.keyCode == 13 ) { if ( doOK() ) onExit(); } else if ( event.keyCode == 27 ) { if ( doCancel() ) onExit(); }"
  40.  onload="doLoad();"
  41. >
  42.   
  43. <windowregion/>
  44. <stack flex="1">
  45.  
  46.   <vbox class="sb_faceplate" flex="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();">
  47.     <hbox class="sb_faceplate">
  48.         <image id="chrome_nw" class="sb_faceplate"/>
  49.         <image id="chrome_n" class="sb_faceplate" flex="1"/>
  50.         <image id="chrome_ne" class="sb_faceplate"/>
  51.     </hbox>
  52.     <hbox class="sb_faceplate" flex="1">
  53.         <image id="chrome_w" class="sb_faceplate"/>
  54.         <spacer onmousedown="onBkgDown( event );" onmouseup="onBkgUp();" flex="1"/>
  55.         <image id="chrome_e" class="sb_faceplate"/>
  56.     </hbox>
  57.     <hbox class="sb_faceplate">
  58.         <image id="chrome_sw" class="sb_faceplate"/>
  59.         <image id="chrome_s" class="sb_faceplate" flex="1"/>
  60.         <image id="chrome_se" class="sb_faceplate"/>
  61.     </hbox>
  62.   </vbox>
  63.  
  64.   <vbox class="sb_faceplate">
  65.     <hbox class="sb_faceplate">
  66.       <spacer height="8" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/> 
  67.     </hbox>
  68.     <hbox class="sb_faceplate" flex="1">
  69.       <spacer width="8" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();" />
  70.       <vbox class="sb_faceplate chrome_bkgd" flex="1">        
  71.       
  72.         <hbox id="window_top" class="sb_faceplate" >
  73.           <label id="app_title" value="&watchfolder.title;" class="sb_faceplate" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  74.           <spacer width="5" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>                    
  75.           <spacer flex="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>           
  76.           <spacer width="5" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  77.           <button id="sysbtn_close" class="sb_faceplate" oncommand="onExit( );" tooltiptext="&tooltip.exit;"/>
  78.         </hbox>
  79.         
  80.         <label class="dialog_label" value="&watchfolder.folderlist;" />
  81.         <spacer height="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  82.         <watch_folders id="watch_folders" browse="&window.browse;" flex="1"/>
  83.         <spacer height="6" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  84.         
  85.         <hbox>
  86.           <spacer flex="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>           
  87.           <button id="button_ok" label="&window.ok;" class="dialog_button sb_faceplate" oncommand="if ( doOK() ) onExit( );"/>
  88.           <spacer width="5" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  89.           <button id="button_cancel" label="&window.cancel;" class="dialog_button sb_faceplate" oncommand="if ( doCancel() ) onExit( );"/>
  90.         </hbox>
  91.         
  92.       </vbox>
  93.       <spacer width="8" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  94.     </hbox>
  95.     <hbox class="sb_faceplate" id="frame_bottom_resizers">
  96.       <x_resizer id="frame_resize_to" dir="bottomleft" x_style="cursor: sw-resize;"/>
  97.       <x_resizer id="frame_resize_t" dir="bottom" x_style="cursor: s-resize;" flex="1"/>
  98.       <x_resizer id="frame_resize_to" dir="bottomright" x_style="cursor: se-resize;"/>
  99.     </hbox>
  100.   </vbox>
  101. </stack>
  102.   
  103.   <script type="application/x-javascript" 
  104.    src="chrome://rmp_demo/content/rmp_demo.js" />
  105.   <script type="application/x-javascript" 
  106.    src="chrome://rmp_demo/content/songbird_interfaces.js"/>
  107.   <script type="application/x-javascript" 
  108.    src="chrome://rmp_demo/content/watch_folders.js" />
  109.   <script>
  110.   <![CDATA[
  111.     var theWatchFolderManager = null;
  112.     function doLoad() 
  113.     {
  114.       try
  115.       {
  116.         if(!theWatchFolderManager)
  117.         {
  118.           theWatchFolderManager = new CWatchFolderManager();
  119.           theWatchFolderManager.CreateWatchFolderManager();
  120.         }
  121.  
  122.         var array = theWatchFolderManager.GetWatchFolders();
  123.         var watch_folders = document.getElementById("watch_folders");
  124.  
  125.         watch_folders.setFolders( array );
  126.         watch_folders.animateNewFolder()
  127.       }
  128.       catch (err)
  129.       {
  130.         alert("watch_folders.xul - doLoad - " + err);
  131.       }
  132.     }
  133.     
  134.     function doOK()
  135.     {
  136.       try
  137.       {
  138.         var watch_folders = document.getElementById("watch_folders");
  139.         var array = watch_folders.getFolders();
  140.       
  141.         theWatchFolderManager.RemoveAllWatchFolders();
  142.         theWatchFolderManager.AddWatchFolders(array);        
  143.       
  144.         if ( window.arguments && window.arguments[0] )
  145.         {
  146.           window.arguments[0].retval = "ok";
  147.         }
  148.       }
  149.       catch(err)
  150.       {
  151.         alert( "watch_folders.xul - doOk - " + err );
  152.       }
  153.       return true;      
  154.     }
  155.     
  156.     function doCancel()
  157.     {
  158.       if ( window.arguments && window.arguments[0] )
  159.       {
  160.         window.arguments[0].retval = "cancel";
  161.       }
  162.       return true;
  163.     }
  164.   ]]>
  165.   </script>
  166.   
  167. </window>
  168.